 /*** CHECK USER LOGIN ***/
  function UserLogin()
    {
        var txtUserName = document.getElementById("txtUserName").value;
        var txtPassword = document.getElementById("txtPassword").value; 
       if(txtUserName == "")
             document.getElementById("lblUsername").innerHTML = "*";
       else if (txtPassword == "")
             document.getElementById("lblPassWord").innerHTML = "*";       
       else
          Dao.UserData.CheckLogin(txtUserName,txtPassword,function (response)
          { 
                if (response.value == true)
                   window.location.href = "Default.aspx?Uid="+txtUserName ;
                else         
                   document.getElementById("lblMessage").innerHTML="Invalid username or password .Please try again!";    

          })
    } 
  /***THE END CHECK USER LOGIN***/
     
  /*** CLEAR MESSAGE ERROR WHEN USER TYPING AGAIN ***/   
    function btnLogin_Click()
    {
         document.getElementById("lblUsername").innerHTML = "";
         document.getElementById("lblPassWord").innerHTML = "";
        document.getElementById("lblMessage").innerHTML = '';
    }
 /*** THE END CLEAR MESSAGE ERROR WHEN USER TYPING AGAIN ***/
 